package com.stone.serverless.core.classloader.config;

import lombok.Getter;
import lombok.Setter;

import java.util.HashMap;
import java.util.Map;

/**
 * @Description: TODO
 * @Author: MECHREVO
 * @Date: 2022/1/17 16:52
 * @Version: 1.0.0
 */
@Getter
@Setter
public class ComponentClassConfig {
    /**
     * 保存已经加载过的Class对象
     */
    private Map<String, Class> cacheAllClassMap = new HashMap<>();

    /**
     * 组件的sclass
     */
    private Map<String, Class> cacheComponentClassMap = new HashMap<>();


    /**
     * 二方包的class
     */
    private Map<String, Class> cacheFrameworkClassMap = new HashMap<>();

    public void uninstall() {
        this.cacheAllClassMap.clear();
        this.cacheComponentClassMap.clear();
        this.cacheFrameworkClassMap.clear();
        this.cacheAllClassMap = null;
        this.cacheComponentClassMap = null;
        this.cacheFrameworkClassMap = null;
    }
}
